<template>
  <div class="paddingCom">
    <img :src="imgurl" alt="" class="pubimg" draggable="false" />
    <p class="txt">{{ comTitle }}</p>
    <slot></slot>
  </div>
</template>
<script>
export default {
  name: "paddingCom",
  props: {
    title: {
      type: String,
    },
    imgsrc: {
      type: String,
      default: "toptis.png",
    },
  },

  data() {
    return {};
  },
  computed: {
    comTitle() {
      return this.title;
    },
    imgurl() {
      return require(`assets/images/zyy/${this.imgsrc}`);
    },
  },
};
</script>
<style lang="scss" scoped="scoped">
.paddingCom {
  position: relative;

  height: 100%;
}
p {
  font-size: 1vw;
  color: #fff;
  font-weight: bold;
}
.pubimg {
  width: 100%;
}
.txt {
  position: absolute;
  top: -0.1vw;
  left: 0.8vw;
}
</style>
